package me.jiatao.springmvc.A_controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class A_HelloAnnotation {

    @RequestMapping("helloaaa")
    public ModelAndView hello(){
        ModelAndView mv = new ModelAndView();
        mv.setViewName("hello");//设置视图名称
        mv.addObject("msg", "这是第一个注解程序");//设置模型数据
        return mv;
    }
}
